﻿<UserControl x:Class="ArchiSimple.Windows.View.FileView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             xmlns:vm="clr-namespace:ArchiSimple.Windows.ViewModel"             
             xmlns:locale="clr-namespace:ArchiSimple.Windows"
             xmlns:v="clr-namespace:ArchiSimple.Windows.View"
             locale:Locator.Locate="vm:FileViewModel"   
             d:DataContext="{d:DesignInstance vm:FileViewModel, IsDesignTimeCreatable=True}"
             >
    <UserControl.Resources>
        <ControlTemplate x:Key="ActionButtonControlTemplate" TargetType="Button">
            <Grid Height="150" Width="300">
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="CommonStates">
                        <VisualState x:Name="MouseOver"/>
                        <VisualState x:Name="Pressed"/>
                        <VisualState x:Name="Disabled"/>
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="FocusStates">
                        <VisualState x:Name="Focused"/>
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="ValidationStates">
                        <VisualState x:Name="InvalidFocused"/>
                        <VisualState x:Name="InvalidUnfocused"/>
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>
                <Rectangle Stroke="{StaticResource GraySolidColor}" >
                    <Rectangle.Fill>
                        <LinearGradientBrush EndPoint="1,1" StartPoint="0,0" Opacity="0.4">
                            <GradientStop Color="#33969696" Offset="0"/>
                            <GradientStop Color="WhiteSmoke" Offset="1"/>
                        </LinearGradientBrush>
                    </Rectangle.Fill>
                </Rectangle>
                <ContentControl Content="{TemplateBinding Content}" FontSize="30" Foreground="{StaticResource GraySolidColor}" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="10,0,0,10" />
            </Grid>
        </ControlTemplate>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Rectangle Width="5" HorizontalAlignment="Left" >
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="1,0" StartPoint="0,0" Opacity="0.5">
                    <GradientStop Color="Black"/>
                    <GradientStop Color="White" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>

        <StackPanel Margin="30,30,30,0">
            <Button Content="Nouveau" Command="{Binding NewCommand}" Template="{StaticResource ActionButtonControlTemplate}" Margin="0,0,0,30" />
            <Button Content="Ouvrir" Command="{Binding OpenCommand}" Template="{StaticResource ActionButtonControlTemplate}" Margin="0,0,0,30" />
            <Button Content="Sauvegarder" Command="{Binding SaveCommand}" Template="{StaticResource ActionButtonControlTemplate}" Margin="0,0,0,30" />
        </StackPanel>
            
        <Grid Grid.Column="2" Margin="30,0,0,0" >
            <Rectangle HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,44,411,0" Height="66" Width="6" Fill="{StaticResource LightGraySolidColor}" />
            <Rectangle HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,411,0" Height="26" Width="6" Fill="{StaticResource LightGraySolidColor}" />
            <Rectangle HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,32,423,0" Height="6" Width="25" Fill="{StaticResource LightGraySolidColor}" />
            <Rectangle HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,32,0,0" Height="6" Width="405" Fill="{StaticResource LightGraySolidColor}" />
            <Ellipse Margin="0,27,406,0" Width="16" Height="16" Fill="{StaticResource BlueSolidColor}" VerticalAlignment="Top" HorizontalAlignment="Right" />
            <TextBlock Text="Archi Simple" FontWeight="Bold" FontSize="60" Foreground="{StaticResource GraySolidColor}" Margin="0,30,30,0" HorizontalAlignment="Right" VerticalAlignment="Top" />
        </Grid>
    </Grid>
</UserControl>
